package com.xidian.zhiancloud.service.exam;

import java.util.List;

import com.github.pagehelper.Page;
import com.xidian.zhiancloud.model.exam.ExamQuestionAnswer;
import com.xidian.zhiancloud.model.exam.ExamTypeCount;
import com.xidian.zhiancloud.model.exam.TExamPaper;
import com.xidian.zhiancloud.qo.BaseReqQuery;

/**
 * 试卷Service接口
 * 
 * @author zhouweitao
 * @date 2021-03-05
 */
public interface ITExamPaperService 
{
    /**
     * 查询试卷
     * 
     * @param id 试卷ID
     * @return 试卷
     */
    public TExamPaper selectTExamPaperById(Long id);

    /**
     * 查询试卷列表
     * 
     * @param tExamPaper 试卷
     * @return 试卷集合
     */
    public Page<TExamPaper> selectTExamPaperList(TExamPaper tExamPaper);

    /**
     * 新增试卷
     * 
     * @param tExamPaper 试卷
     * @return 结果
     */
    public int insertTExamPaper(TExamPaper tExamPaper);

    /**
     * 修改试卷
     * 
     * @param tExamPaper 试卷
     * @return 结果
     */
    public int updateTExamPaper(TExamPaper tExamPaper);

    /**
     * 批量删除试卷
     * 
     * @param ids 需要删除的试卷ID
     * @return 结果
     */
    public int deleteTExamPaperByIds(Long[] ids);

    /**
     * 删除试卷信息
     * 
     * @param id 试卷ID
     * @return 结果
     */
    public int deleteTExamPaperById(Long id);
    
    public Page<ExamTypeCount> getTypeCount(BaseReqQuery query);

	public Object getPaper(Long paperId, String type);

	public int insertTExamPaperAnswers(List<ExamQuestionAnswer> answers);

	public Object getPaperAnswers(Long paperId,String type,Long userId);
}
